<include file="Public/min-header" />
<style>
    .col100{width:100px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .col150{width:150px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .col300{width:300px;text-align:center;float:left;display:inline;border-right:1px solid #0080FF;}
    .coltop{border-top:1px solid #0080FF;}
    .colno{border-right:none;}
    .wrapper{min-height:1000px!important;}
</style>
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <nav class="navbar navbar-default">
                            <div class="collapse navbar-collapse">
                                <form class="navbar-form form-inline" action="{:U('Business/withdraw')}" method="post">
                                    <div class="form-group">
                                        <input type="text" name="keywords" class="form-control" placeholder="商家名称">
                                    </div>
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </form>
                            </div>
                        </nav>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable">
                                    <thead>
                                    <tr role="row">
                                        <th>ID</th>
                                        <th width="180">商家名称</th>
                                        <th>银行卡号</th>
                                        <th>银行名称</th>
                                        <th>持卡人</th>
                                        <th>提现金额</th>
                                        <th>提现时间</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="withdraw" item="vo" key="k">
                                        <tr role="row" align="center">
                                            <td style="line-height:34px;">{$vo.id}</td>
                                            <td align="left" style="line-height:34px;">{$vo['store_name']}</td>
                                            <td align="left" style="line-height:34px;">{$vo.bank_sn}</td>
                                            <td align="left" style="line-height:34px;">{$vo.bank_name}</td>
                                            <td align="left" style="line-height:34px;">{$vo.use_name}</td>
                                            <td align="left" style="line-height:34px;">{$vo.price}</td>
                                            <td align="left" style="line-height:34px;">{$vo.add_time|date="Y-m-d H:i:s",###}</td>
                                            <td align="left" style="line-height:34px;">
												<if condition="$vo['status'] eq 1">
                                                	<span style="color:green">已完成</span>
                                                <else />
                                                	<span style="color:red">提现中</span>
                                                </if>
                                            </td>
                                            <td style="line-height:34px;">
                                           	 	<if condition="$vo['status'] lt 1">
                                                	<a class="btn btn-info" onclick="sub_withdraw({$vo.id});">确认打款</a>
                                                </if>
                                            </td>
                                        </tr>
                                    </foreach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>

<script>
    $('.order_sn').mouseenter(function(){
        $(this).find('.goods_list').show();
    }).mouseleave(function(){
        $(this).find('.goods_list').hide();
    });
	function sub_withdraw(id){
		layer.open({
            content: '您确认已经打款了吗？'
            ,btn: ['已确定', '取消']
            ,yes: function(index){
				$.post('/Admin/Business/withdraw/',{id:id,act:'ajax'},function(data){
					if(data.code==200){
						window.location='/Admin/Business/withdraw/';
					}
				},'json');
                layer.closeAll();
            }
        });
	}
</script>
</html>
